<%@ page contentType="text/html;charset=UTF-8" language="java" import="com.cq.school.factory.ServiceFactory" %>
<%@ page import="java.util.List" %>
<%@ page import="com.cq.school.entity.Article" %>
<%@ page import="com.cq.school.entity.School" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    List<Article>  news = ServiceFactory.getArticleService().listArticleByCreateTime(9);
    List<School> recomm3 = ServiceFactory.getSchoolService().listRecommenSchool(4,7);
    List<Article>  tops = ServiceFactory.getArticleService().listArticleByHits(10);
    request.setAttribute("news",news);
    request.setAttribute("recomm3",recomm3);
    request.setAttribute("tops",tops);
%>
<div class="w300 h f_l m_l_10">
    <div><a href="indx.html" target="_blank"><img src="/images/nryc1.jpg" class="b_c" align="absmiddle" border="0" height="200" width="300"></a></div>
    <div class="h m_t_10 ">
        <div class="newsbt">
            <div class="newsbtz f_l">最新新闻</div>
        </div>
        <div class="news_xm newsbtzk">
            <ul>
                <c:forEach items="${news}" var="article">
                    <li><a href="/article/view/${article.id}" title="${article.title}">${article.title}</a></li>
                </c:forEach>
            </ul>
        </div>
    </div>
    <div class="h m_t_10 ">
        <div class="newsbt">
            <div class="newsbtz f_l">推荐院校</div>
        </div>
        <div class="p_l_10">
            <ul>
                <c:forEach items="${recomm3}" var="school">
                    <li><a href="/manage/school/update/${school.id}" target="_blank"><font class="font_14 font_w c_f5" color="#CC0000">◆${school.name}</font></a></li>
                </c:forEach>
        </ul>
        </div>
    </div>

    <div class="h m_t_10 ">
        <div class="newsbt">
            <div class="newsbtz f_l">报读流程</div>
        </div>
        <div class="ej_lc b_c">
            <ul>
                <li class="font_14 font_w c_l">了解学校</li>
                <li><a href="/apply">网上或电话报名</a></li>
                <li class="font_14 font_w c_l">学校招生办确认报名信息</li>
                <li class="font_14 font_w c_l">审核通过，缴费报名</li>
                <li class="font_14 font_w c_l">报到入学</li>
            </ul>
        </div>
    </div>
    <div class="h m_t_10 ">
        <div><a href="#" target="_blank"><img src="/images/nryc.jpg" class="b_c" align="absmiddle" border="0" height="200" width="300"></a></div>
    </div>
    <div class="h m_t_10 ">
        <div class="newsbt">
            <div class="newsbtz f_l">点击排行</div>
        </div>
        <div class="news_xm newsbtzk">
            <ul>
                <c:forEach items="${tops}" var="article">
                    <li><a href="/article/view/${article.id}" title="${article.title}">${article.title}</a></li>
                </c:forEach>
            </ul>
        </div>
    </div>

</div>